﻿/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
 */

CKEDITOR.editorConfig = function(config) {
	// Define changes to default configuration here. For example:
	config.language = 'zh-cn'; // 配置语言
	//config.uiColor = '#FFF'; // 背景颜色
	//config.width = '660'; // 宽度
	config.height = '300px'; // 高度

	config.toolbar = 'Full';// 工具栏风格Full,Basic
	
	config.filebrowserUploadUrl = getRootPath()+'/ckeditor/uploader?Type=File';
	config.filebrowserImageUploadUrl =  getRootPath()+'/ckeditor/uploader?Type=Image';
	config.filebrowserFlashUploadUrl =  getRootPath()+'/ckeditor/uploader?Type=Flash';
	
	
};


getRootPath = function (){
	var strFullPath=window.document.location.href;
	var strPath=window.document.location.pathname;
	var pos=strFullPath.indexOf(strPath);
	var prePath=strFullPath.substring(0,pos);
	var postPath=strPath.substring(0,strPath.substr(1).indexOf('/')+1);
	return (prePath+postPath);
}
